<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" Content="text-html; charset=Windows-1252">
<title>The :link, :visited, and :active Pseudo-Classes</title>
<style>@import url(coUA.css);</style>
</HEAD>

<BODY>
<h3><a name="cssattr_0001030201010000"></a>The :link, :visited, and :active Pseudo-Classes</h3>
<p>
The <a name="cssattr_0001030201010001"></a><b>:link</b>, <a name="cssattr_0001030201010002"></a><b>:visited</b>, and <a name="cssattr_0001030201010003"></a><b>:active</b> pseudo-classes let you set the style of A elements based on the current state of the links. In a selector, you use these pseudo-classes with the A element in the same way you would use class identifiers. </p>
<p>
A:link   { color: red }           /* unvisited link */</p>
<p>
A:visited  { color: blue }       /* visited links */</p>
<p>
Unlike class identifiers, you do not use the pseudo-classes with the <b>CLASS=</b> attribute. Instead, the browser automatically interprets which pseudo-class to use based on the state of the link. </p>
<p>
You can combine pseudo-classes with normal classes. </p>
<p>
A.external:visited { color: blue }</p>
<p>
If the URL specified by an A element having the external class (defined above) has been visited, it displays in blue. Note that normal class identifiers must precede the pseudo-class in the selector. </p>
<p>
You can apply pseudo-classes to nested element names, just as with class identifiers. </p>
<p>
A:link IMG { border: solid blue }</p>
<p>
Using pseudo-classes on elements other than the A element has no effect. </p>
</BODY>
</HTML>